﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MiniCAP.Core
{
    public interface IMessageStorage
    {
        Task<string> StoreMessageAsync(string topic, object content, IDbTransaction? transaction = null);
        Task UpdateMessageStatusAsync(string messageId, MessageStatus status);
        Task<IEnumerable<StoredMessage>> GetPendingMessagesAsync(int batchSize = 100);
    }

    public enum MessageStatus
    {
        Scheduled,
        Published,
        Succeeded,
        Failed
    }
}
